<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'index.jsp' starting page</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<script
			src="http://ditu.google.cn/maps?file=api&amp;v=2&amp;key=ABQIAAAARqWWAJSskRjPZ84WYabNxhT2yXp_ZAY8_ufC3CFXhHIE1NvwkxQASyI3IocIBqKmrKrhVie-DyiFBg&sensor=true_or_false"
			type="text/javascript"></script>
		<script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        //map.setMapType(G_SATELLITE_MAP);
        //map.setZoom(13);
        map.setCenter(new GLatLng(39.9493, 116.3975), 13);
        /*
        map.openInfoWindow(map.getCenter(),
                   document.createTextNode("Hello, world"));
          */
          
/*          
GEvent.addListener(map,"click", function(overlay, latlng) {     
  if (latlng) { 
    var myHtml = "GPoint 为: " + map.fromLatLngToDivPixel(latlng) + ",缩放级别:" + map.getZoom();
    map.openInfoWindow(latlng, myHtml);
  }
});
*/
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());         
map.addControl(new GOverviewMapControl ());
map.addControl(new GMapTypeControl());                   
                   
        //map.disableDragging();
        /*
        window.setTimeout(function() {
  map.panTo(new GLatLng(30.927, 116.407));
}, 5000);
        
        
        var bounds = map.getBounds();
  		var southWest = bounds.getSouthWest();
  		var northEast = bounds.getNorthEast();
  		var lngSpan = northEast.lng() - southWest.lng();
  		var latSpan = northEast.lat() - southWest.lat();
  		for (var i = 0; i < 10; i++) {
    		var point = new GLatLng(southWest.lat() + latSpan * Math.random(),
        	southWest.lng() + lngSpan * Math.random());
    		map.addOverlay(new GMarker(point));
  		}
  		*/
      }
    }

    </script>

	</head>

	<body onload="initialize()" onunload="GUnload()">
		<div id="map_canvas" style="width: 1500px; height: 800px"></div>
	</body>

</html>
